<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<%@include file="/comment/comment.jsp" %>

<body>  
<!--Begin Header Begin-->
<%--<div class="soubg">
	<div class="sou">
        <span class="fr">
        	<span class="fl">你好，请<a href="Login.jsp">登录</a>&nbsp; <a href="Regist.jsp" style="color:#ff4e00;">免费注册</a>&nbsp;
			<a href="Regist.jsp" style="color:#ff4e00;">验证码登录</a>&nbsp;<a href="Regist.jsp" style="color:#ff4e00;">微信登录</a>&nbsp;
			|<a href="#">我的订单</a>&nbsp;|<a href="#">后台管理</a>&nbsp;|<a href="#">注销
        </span>
    </div>
</div>--%>
<%@include file="/comment/header.jsp"%>
<!--End Header End--> 
<!--Begin Login Begin-->
<div class="log_bg">	
    <div class="top">
        <div class="logo"><a href="Index.jsp"><img src="images/logo.png" /></a></div>
    </div>
	<div class="regist" >
    	<div class="log_img"><img src="images/l_img.png" width="611" height="425" /></div>
		<div class="reg_c">
        	<form id="myform" action="/AddServlet" onsubmit="add()">
            <table border="0" style="width:420px; font-size:14px; margin-top:20px;" cellspacing="0" cellpadding="0">
              <tr height="50" valign="top">
              	<td width="95">&nbsp;</td>
                <td>
                	<span class="fl" style="font-size:24px;">注册</span>
                    <span class="fr">已有商城账号，<a href="Login.jsp" style="color:#ff4e00;">我要登录</a></span>
                </td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;用户名 &nbsp;</td>
                <td><input type="text" value="" class="l_user" id="l_user" name="l_user" id="l_user"/></td>
              </tr>
                <tr height="50">
                    <td align="right"><font color="#ff4e00">*</font>&nbsp;昵称 &nbsp;</td>
                    <td><input type="text" value="" class="l_user" id="nick_name" name="nick_name" id="nick_name"/></td>
                </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;密码 &nbsp;</td>
                <td><input type="password" value="" class="l_pwd" name="l_pwd" id="l_pwd"/></td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;确认密码 &nbsp;</td>
                <td><input type="password" value="" class="l_pwd" name="pwd" id="pwd"/></td>
              </tr>
                <tr height="50">
                    <td align="right">性别 &nbsp;</td>
                    <td>男<input type="radio" value="1" checked name="sex"/>
                    女<input type="radio" value="2" name="sex"/></td>
                </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;邮箱 &nbsp;</td>
                <td><input type="text" value="" class="l_email" name="l_email" id="l_email"/></td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;手机 &nbsp;</td>
                <td><input type="text" value="" class="l_tel" name="l_tel" id="l_tel"/></td>
              </tr>
<%--              <tr height="50">--%>
<%--                <td align="right">邀请人会员名 &nbsp;</td>--%>
<%--                <td><input type="text" value="" class="l_mem" name="l_mem" id="l_mem"/></td>--%>
<%--              </tr>--%>
<%--              <tr height="50">--%>
<%--                <td align="right">邀请人ID号 &nbsp;</td>--%>
<%--                <td><input type="text" value="" class="l_num" name="l_num" id="l_num"/></td>--%>
<%--              </tr>--%>
              <tr height="50">
                <td align="right"> <font color="#ff4e00">*</font>&nbsp;验证码 &nbsp;</td>
                <td>
                    <input type="text" value="" class="l_ipt" />
                    <a href="#" style="font-size:12px; font-family:'宋体';">换一张</a>
                </td>
              </tr>
              <tr>
              	<td>&nbsp;</td>
                <td style="font-size:12px; padding-top:20px;">
                	<span style="font-family:'宋体';" class="fl">
                    	<label class="r_rad" ><input type="checkbox"  /></label><label class="r_txt">我已阅读并接受《用户协议》</label>
                    </span>
                </td>
              </tr>
              <tr height="60">
              	<td>&nbsp;</td>
                <td><input type="submit" value="立即注册" class="log_btn" /></td>
              </tr>
            </table>
            </form>
        </div>
    </div>
</div>
<%@include file="/comment/version.jsp"%>
<!--End Footer End -->
<script src="/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
    function add() {
        var l_user = $("#l_user").val();
        var l_pwd = $("#l_pwd").val();
        var pwd = $("#pwd").val();
        var l_email = $("#l_email").val();
        var nick_name = $("#nick_name").val();
        // var email =  /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
        if(l_user == ""){
            alert("用户名不能为空");
            return;
        }else if (l_pwd == ""){
            alert("密码不能为空");
            return;
        }else if (pwd != l_pwd){
            alert("两次密码必须相同");
            return;
        }else if (l_email == ""){
            alert("邮箱不能为空");
            return;
        }else if (l_email != email){
            alert("格式不正确");
            return;
        }else if (nick_name == ""){
            alert("昵称不能为空");
            return;
        }
        $("#myform").submit();
    }
</script>

</body>

<!--[if IE 6]>
<script src="//letskillie6.googlecode.com/svn/trunk/2/zh_CN.js"></script>
<![endif]-->
</html>
